package com.example.jbservice.Mapper;

import com.example.jbservice.Bean.Register;
import com.example.jbservice.Dto.DeptDto;
import com.example.jbservice.Dto.PatientDto;
import com.example.jbservice.Dto.RegisterDTO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Mapper
public interface RegisterMapper {

    /**
     * 挂号表插入
     * @param register
     */
    void insert(Register register);

	@MapKey("dept_code")
	Map<String,String> SearchDept();

	List<DeptDto> GetDept();

	String Qry();


	@Select("select  CARD_NO  from com_patientinfo where idenno= #{idenno}")
	String GetPatientCardByIdenno(String idenno);

	PatientDto GetPatientInfoByCardNo(String card_no);

	void CreatePatient(PatientDto patientDto);

	@Select(" select count(1) from register where clinic_code=#{clinic_code} and valid_flag= 1 ")
	Integer getRegisterValid(String clinic_code);


	void cancleReg(RegisterDTO registerDTO);
}
